<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>1_函数式组件</title>
		<script src="../js/react.development.js"></script>
		<script src="../js/react-dom.development.js"></script>
		<script src="../js/babel.min.js"></script>
	</head>
	<body>
		<div id="test"></div>

	</body>
	<script type="text/babel">
		function MyComponent(){
			console.log(this); //此处的this是undefined，因为babel编译后开启了严格模式
			return <h1>我是函数式定义的组件（适用于【简单组件】的定义）</h1>
		}
		
		ReactDOM.render(<MyComponent/>,document.getElementById('test'))
	</script>
</html>
